<template>
  <h2>child2组件</h2>
  <p>子组件count:{{ count }}</p>
  <p>{{ obj.name }}的年龄是{{ obj.age }}</p>
  <p>{{ name1 }}</p>
</template>

<script lang="ts" setup>
// import type { PropType } from "vue";
import type { objType } from "../compositions.vue";
import { inject } from "vue";
// defineProps({
//   count: {
//     type: Number,
//   },
//   obj: Object as PropType<objType>,
// });
const props = defineProps<{ count: number; obj: objType }>();
const name1 = inject<string>("name");
</script>
